// 班级管理模块
import { request } from '../util/request.js'

export function getGrades() { // 下拉年级获取所有年级
    return request( '/api/classes/get/grades',null, 'get')
}

export function getMajors(data) { // 下拉专业获取所有专业
    return request( '/api/classes/get/majors', data, 'get')
}

export function getNumbers(data) { // 下拉班号获取所有班号
    return request( '/api/classes/get/numbers', data, 'get')
}
//get
export function getClasses(data) { // 获取班级信息
    return request('/api/classes/getAllClasses', data, 'get')
}

export function queryClasses(data) { // 根据年级，专业，班号添加搜索班级
    return request('/api/classes/query', data, 'post')
}

export function addClasses(data) { //添加班级
    return request('/api/classes/add', data, 'post')
}
//get
export function deleteClasses(data) { //删除班级
    console.log(data)
    return request('/api/classes/delete', data, 'get')
}

export function batchDeleteClasses(data) { //批量删除班级
    return request('/api/classes/delete', data, 'post')
}

export function addStudent(data){ // 添加单个学生
    return request('/api/student/addOneStudent', data, 'post')
}

export function addTeacher(data){ // 添加单个老师
    return request('/api/teacher/addOneTeacher', data, 'post')
}
